﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Home/Layouts/Home.Master" AutoEventWireup="true"
    CodeBehind="News.aspx.cs" Inherits="MLM.Home.Pages.News" %>

<%@ Import Namespace="MLM.Home" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h3 class="main_title">
        News
    </h3>
    <div class="main_content">
        <div id="news_wrapper">
            <asp:ListView runat="server" ID="NewsLv" DataSourceID="NewsEds">
                <ItemTemplate>
                    <div class="news_item">
                        <img src='<%#Eval("ThumbImage") %>' />
                        <a href='<%#Eval("ID").LinkItemDetailShort(Eval("Title"),"ReadNews") %>'>
                            <%#Eval("Title") %></a>
                        <p>
                            <%#Eval("Description") %></p>
                    </div>
                </ItemTemplate>
            </asp:ListView>
            <asp:EntityDataSource ID="NewsEds" runat="server" ConnectionString="name=MLMDataContext"
                AutoGenerateWhereClause="True" DefaultContainerName="MLMDataContext"  EntitySetName="FrontEndNews">
            </asp:EntityDataSource>
        </div>
        <div class="Pager">
            Page:
            <asp:DataPager ID="DataPager1" runat="server" PagedControlID="NewsLv" PageSize="10"
                QueryStringField="p">
                <Fields>
                    <asp:NumericPagerField runat="server" ButtonCount="10" />
                </Fields>
            </asp:DataPager>
        </div>
    </div>
</asp:Content>
